package com.yuyou.tas.lesson.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yuyou.tas.service.api.lesson.entity.LessonClassStudent;
import com.yuyou.tas.service.api.lesson.entity.Student;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;

public interface ILessonClassStudentService {
    int deleteByPrimaryKey(Long id);

	/**
	 * 根据班级主键和状态删除数据
	 * @param classId
	 * @param regStatus
	 * @return
	 */
	int deleteByClassId7regStatus(Long classId, Integer regStatus,Long authOrganizationId);
    
    int insert(LessonClassStudent record);

    LessonClassStudent selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LessonClassStudent record);
    
    /**
     * 外部系统同步班级学生信息
     * @param list
     * @return
     */
    ResBoolSimpleInfo<String> sycnStuClass(List<LessonClassStudent> list);
    
    /**
     * 根据机构ID和Oid找出唯一记录
     * @param lessonClassOId
     * @param studentOId
     * @param authOrganizationId
     * @return
     */
    LessonClassStudent selectByOrgan7OId(Long lessonClassOId,Long studentOId,Long authOrganizationId);
    
    /**
     * 定时更新班级学生数据
     */
    ResBoolSimpleInfo<String> sycnClassStudentData(String startTime);
    
    /**
     * 班级学生关系-学生同步
     * @param studentId
     * @param studentOId
     * @param authOrganizationId
     */
    void sycnStudent(Long studentId,Long studentOId,Long authOrganizationId);
    
    /**
     * 班级学生关系-班级同步
     * @param lessonClassId
     * @param lessonClassOId
     * @param authOrganizationId
     */
    void sycnClass(Long lessonClassId, Long lessonClassOId,Long authOrganizationId);

    /**
     * studentId查找
     * @param studentId
     * @return
     */
    List<LessonClassStudent> findByStudentId(Long studentId);
    
    /**
     * studentOId查找
     * @param studentId
     * @return
     */
    List<LessonClassStudent> findByStudentOId(Long studentOId);
    
    /**
     * 查找唯一学生
     * @param authOrganizationId
     * @param lessonClassId
     * @param lessonClassOId
     * @param studentId
     * @param studentOId
     * @return
     */
    Student selectUniStudent(Long authOrganizationId,Long lessonClassId,Long lessonClassOId,Long studentId,Long studentOId
    		);
    
}